package com.gack.business.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.gack.business.service.StoreAttentionServiceInterface;
import com.gack.helper.common.AjaxJson;
import com.gack.helper.common.abstractobj.ApiController;

import io.swagger.annotations.ApiOperation;

/**
 * 
* @ClassName: StoreAttentionController 
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author (ZhangXinYu)  
* @date 2018年9月6日 下午5:19:15 
* @version V1.0
 */
@RestController
@RequestMapping(ApiController.STORE_ATTENTION_URL)
public class StoreAttentionController {
	
	@Autowired
	private StoreAttentionServiceInterface storeAttentionService;
	
	@ApiOperation(notes="编辑门店注意事项",value="编辑门店注意事项")
	@PostMapping("edit")
	public AjaxJson edit(String attention){
		AjaxJson ajaxJson = new AjaxJson();
		ajaxJson.setStatus(200).setSuccess(true).setData(storeAttentionService.edit(attention));
		return ajaxJson;
	}
	
	@ApiOperation(notes="查询门店注意事项",value="查询门店注意事项")
	@PostMapping("get")
	public AjaxJson get(){
		AjaxJson ajaxJson = new AjaxJson();
		ajaxJson.setStatus(200).setSuccess(true).setData(storeAttentionService.get());
		return ajaxJson;
	}
}
